Skip to content

[Confluence] Escape the CDATA terminator in the macro helpers - #1725

Merged
gonchik merged 1 commit into
atlassian-api:masterfrom
Shriraj1901:fix-cdata-terminator-in-macro-helpers
Nov 20, 2026
Merged

gonchik merged 1 commit into
atlassian-api:masterfrom
Shriraj1901:fix-cdata-terminator-in-macro-helpers

Conversation

@Shriraj1901

Copy link
Copy Markdown
Contributor

block_code_macro_confluence, html_code__macro_confluence and noformat_code_macro_confluence put their text straight into a CDATA section. Text that contains "]]>" (an XML snippet in a code block, an html macro that has its own CDATA) ends the section early and the storage body is no longer well-formed, so Confluence rejects the page.

Split the terminator over two CDATA sections, the same way _coerce_structured_storage_body already does for JSON bodies. The text is unchanged once the XML is parsed.

block_code_macro_confluence, html_code__macro_confluence and
noformat_code_macro_confluence put their text straight into a CDATA
section. Text that contains "]]>" (an XML snippet in a code block, an
html macro that has its own CDATA) ends the section early and the
storage body is no longer well-formed, so Confluence rejects the page.

Split the terminator over two CDATA sections, the same way
_coerce_structured_storage_body already does for JSON bodies. The text
is unchanged once the XML is parsed.
@gonchik
gonchik merged commit 06dc8f1 into atlassian-api:master Nov 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants